package com.milkcoffee.designpatterns.singleton;

/**
 * @author zxs
 */
public class LazySingletonTest {

    public static void main(String[] args) {

        // 懒汉模式测试
        new Thread(() -> {
            LazySingleton instance = LazySingleton.getInstance();
            System.out.println(instance);
        }).start();

        new Thread(() -> {
            LazySingleton instance = LazySingleton.getInstance();
            System.out.println(instance);
        }).start();


    }
}
